name: pre-commit run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-yiDI/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 2242535521 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/bgpcep-tox-verify-master/.tox env VIRTUAL_ENV: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2397 cwd: /w/workspace/bgpcep-tox-verify-master allow: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin/* cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing tests/test_suites/bgp_userfeatures/bgp_llgr_basic.py Fixing tests/test_suites/bgp_userfeatures/080_bgp_functional_rt_constrain.py Fixing tests/test_suites/bgp_userfeatures/ibgp_peer_lsp.py Fixing tests/test_suites/bgp_userfeatures/ibgp_peers_basic.py Fixing tests/test_suites/bgp_userfeatures/bgp_functional_md5.py Fixing tests/lib/pcep.py Fixing tests/lib/flowspec.py Fixing tests/test_suites/bgp_userfeatures/030_bgp_functional_evpn.py Fixing tests/lib/bgp.py Fixing tests/data/bgpuser/empty_topology/data.json Fixing tests/test_suites/bgp_userfeatures/010_bgp_functional_l3vpn.py Fixing tests/test_suites/bgp_userfeatures/010_bgp_flowspec.py Fixing tests/test_suites/bgp_userfeatures/070_bgp_functional_l3vpn_mcast.py Fixing tests/lib/infra.py Fixing tests/test_suites/bgp_userfeatures/050_bmp_basic.py Fixing tests/data/bgpfunctional/l3vpn_ipv4/bgp_l3vpn_ipv4/data.json Fixing tests/lib/utils.py Fixing tests/test_suites/bgp_userfeatures/060_bgp_functional_mvpn.py Fixing tests/lib/ip_topology.py Fixing tests/test_suites/bgp_userfeatures/bgp_app_peer_basic.py Fixing tests/data/bgpuser/filled_topology/data.json Tabs remover.............................................................Failed - hook id: remove-tabs - exit code: 1 - files were modified by this hook Substituting tabs in: tests/test_suites/bgp_userfeatures/070_bgp_functional_l3vpn_mcast.py by 4 whitespaces Tabs have been successfully removed. Now aborting the commit. You can check the changes made. Then simply "git add --update ." and re-commit Substituting tabs in: tests/test_suites/bgp_userfeatures/010_bgp_functional_l3vpn.py by 4 whitespaces Substituting tabs in: tests/test_suites/bgp_userfeatures/080_bgp_functional_rt_constrain.py by 4 whitespaces Tabs have been successfully removed. Now aborting the commit. You can check the changes made. Then simply "git add --update ." and re-commit Substituting tabs in: tests/test_suites/bgp_userfeatures/060_bgp_functional_mvpn.py by 4 whitespaces Tabs have been successfully removed. Now aborting the commit. You can check the changes made. Then simply "git add --update ." and re-commit Substituting tabs in: tests/test_suites/bgp_userfeatures/030_bgp_functional_evpn.py by 4 whitespaces Tabs have been successfully removed. Now aborting the commit. You can check the changes made. Then simply "git add --update ." and re-commit pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/data/bgpfunctional/l3vpn_ipv4/bgp_l3vpn_ipv4/data.json b/tests/data/bgpfunctional/l3vpn_ipv4/bgp_l3vpn_ipv4/data.json index 282ab6fb20..98376e0b05 100644 --- a/tests/data/bgpfunctional/l3vpn_ipv4/bgp_l3vpn_ipv4/data.json +++ b/tests/data/bgpfunctional/l3vpn_ipv4/bgp_l3vpn_ipv4/data.json @@ -26,4 +26,3 @@ ] } } - \ No newline at end of file diff --git a/tests/data/bgpuser/empty_topology/data.json b/tests/data/bgpuser/empty_topology/data.json index 178bf4035a..005014ebbf 100644 --- a/tests/data/bgpuser/empty_topology/data.json +++ b/tests/data/bgpuser/empty_topology/data.json @@ -9,4 +9,3 @@ } ] } - \ No newline at end of file diff --git a/tests/data/bgpuser/filled_topology/data.json b/tests/data/bgpuser/filled_topology/data.json index 1b8223483d..77b8ae18b2 100644 --- a/tests/data/bgpuser/filled_topology/data.json +++ b/tests/data/bgpuser/filled_topology/data.json @@ -27,4 +27,3 @@ } ] } - \ No newline at end of file diff --git a/tests/lib/bgp.py b/tests/lib/bgp.py index 89e4f41d8c..0e94144a83 100644 --- a/tests/lib/bgp.py +++ b/tests/lib/bgp.py @@ -262,7 +262,7 @@ def start_bgp_speaker( allf: bool | None = None, evpn: bool | None = None, mvpn: bool | None = None, - l3vpn_mcast: bool | None = None, + l3vpn_mcast: bool | None = None, rt_constrain: bool | None = None, wfr: int | None = None, cluster: str | None = None, @@ -436,7 +436,7 @@ def start_bgp_app_peer( log_level: str = "info", timeout: int = 1200, ) -> tuple[int, str]: - """??? NOt necessary always to have these parames and if not provided skip them + """??? NOt necessary always to have these parames and if not provided skip them and not provide to the scrpt count, prefix: str = "8.0.0.0", prefix_len: int = 28,""" """Starts bgp_app_peer.py for manipulating BGP neighbour rib table. @@ -493,7 +493,7 @@ def start_exabgp( subprocess.Popen: Exabgp process handler. """ command = f"env exabgp.tcp.port=1790 exabgp --debug {cfg_file}" - + process = infra.shell(command, run_in_background=True) return process @@ -554,7 +554,7 @@ def start_gobgp( """??? """ command = f"{gobgp_path} -l debug -f {cfg_file} > tmp/gobgp.log" - + process = infra.shell(command, run_in_background=True) return process diff --git a/tests/lib/flowspec.py b/tests/lib/flowspec.py index 869e97742d..cfa1140fad 100644 --- a/tests/lib/flowspec.py +++ b/tests/lib/flowspec.py @@ -21,7 +21,7 @@ ODL_IP = os.environ["ODL_IP"] RESTCONF_PORT = os.environ["RESTCONF_PORT"] log = logging.getLogger(__name__) - + def verify_flowspec_data_is_empty(): templated_requests.get_templated_request("data/bgpflowspec/empty_route", None, verify=True) diff --git a/tests/lib/infra.py b/tests/lib/infra.py index 1d5da442f7..8194ea0907 100644 --- a/tests/lib/infra.py +++ b/tests/lib/infra.py @@ -98,7 +98,7 @@ def shell( except FileNotFoundError: log.error(f"ERROR command not found: {exec_command}") return None, None - + def read_until(process: subprocess.Popen, expected_text: str, timeout: int = 10): "This exepcted text must be within one line, it can not spread across mutliple lines" found_event = threading.Event() @@ -112,7 +112,7 @@ def read_until(process: subprocess.Popen, expected_text: str, timeout: int = 10) if line and expected_text in line: found_event.set() return - + queue = Queue() thread = threading.Thread(target=threaded_read, args=(process.stdout, expected_text, queue), daemon=True) thread.start() @@ -389,7 +389,7 @@ def stop_process_by_pid(pid: int, gracefully: bool = True, timeout: int | None = raise AssertionError( f"Was not able to stop process with PID {process.pid}, it is still running." ) from e - + def download_file(url: str): file_name = url.split("/")[-1] urllib.request.urlretrieve(url, f"tmp/{file_name}") @@ -397,5 +397,5 @@ def download_file(url: str): def get_file_content(path: str): with open(path, "r", encoding="utf-8") as file: content = file.read() - + return content diff --git a/tests/lib/ip_topology.py b/tests/lib/ip_topology.py index 1d2c149885..f695ea8ad7 100644 --- a/tests/lib/ip_topology.py +++ b/tests/lib/ip_topology.py @@ -114,7 +114,7 @@ def wait_for_ipv4_topology_prefixes_to_become_stable( raise AssertionError( f"Expected Ipv4 topology to be stable after {timeout} seconds" ) - + def verify_ip_topology_is_empty(): templated_requests.get_templated_request("data/bgpuser/empty_topology", None, verify=True) diff --git a/tests/lib/pcep.py b/tests/lib/pcep.py index ec652f4b83..eb986cc9f8 100644 --- a/tests/lib/pcep.py +++ b/tests/lib/pcep.py @@ -99,7 +99,7 @@ def configure_speaker_entitiy_identifier(): resposne = templated_requests.put_templated_request( "data/templates/node_speaker_entity", mapping, json=False ) - + return resposne def add_lsp(pcc_ip: str, lsp_name: str): @@ -107,7 +107,7 @@ def add_lsp(pcc_ip: str, lsp_name: str): resposne = templated_requests.post_templated_request( "data/templates/pcep_add_lsp", mapping, json=False ) - + return resposne def update_lsp(pcc_ip: str, lsp_name: str): @@ -115,7 +115,7 @@ def update_lsp(pcc_ip: str, lsp_name: str): resposne = templated_requests.post_templated_request( "data/templates/pcep_update_lsp", mapping, json=False ) - + return resposne def remove_lsp(pcc_ip: str, lsp_name: str): @@ -123,7 +123,7 @@ def remove_lsp(pcc_ip: str, lsp_name: str): resposne = templated_requests.post_templated_request( "data/templates/pcep_remove_lsp", mapping, json=False, accept="*/*" ) - + return resposne diff --git a/tests/lib/utils.py b/tests/lib/utils.py index 5809286799..bc86504ddf 100644 --- a/tests/lib/utils.py +++ b/tests/lib/utils.py @@ -32,7 +32,7 @@ def verify_jsons_matach(json1: str, json2: str, json1_data_label: str = "json1", ) ) raise AssertionError(f": \n{visual_diff}") - + def wait_until_function_pass( retry_count: int, interval: int, function: Callable, *args, **kwargs @@ -136,7 +136,7 @@ def wait_until_function_returns_value_with_custom_value_validator( f"Failed to execute {function.__name__}({','.join([str(arg) for arg in args])} {kwargs or ''}) " \ f"after {retry_count} attempts." ) from last_exception - + def verify_function_never_passes_within_timeout( retry_count: int, interval: int, function: Callable, *args, **kwargs ) -> Any: @@ -174,7 +174,7 @@ def verify_function_never_returns_value( raise e else: raise AssertionError("Function did return expected value within timeout") - + def verify_function_passes_for_some_time( retry_count: int, interval: int, function: Callable, *args, **kwargs ) -> Any: @@ -264,7 +264,7 @@ def verify_function_returns_value_which_passes_custom_value_validator_for_some_t time.sleep(interval) return result - + def run_function_ignore_errors(function: Callable, *args, **kwargs): try: function(*args, **kwargs) diff --git a/tests/test_suites/bgp_userfeatures/010_bgp_flowspec.py b/tests/test_suites/bgp_userfeatures/010_bgp_flowspec.py index 60fadbbe73..ac89087010 100644 --- a/tests/test_suites/bgp_userfeatures/010_bgp_flowspec.py +++ b/tests/test_suites/bgp_userfeatures/010_bgp_flowspec.py @@ -38,7 +38,7 @@ log = logging.getLogger(__name__) @pytest.mark.usefixtures("teardown_kill_all_running_play_script_processes") @pytest.mark.run(order=15) class TestBgpFlowspec: - + def set_bgp_peer_configuration(self): """??? """ @@ -96,5 +96,5 @@ class TestBgpFlowspec: """Deconfigure BGP peer.""" self.delete_bgp_peer_configuration() - + diff --git a/tests/test_suites/bgp_userfeatures/010_bgp_functional_l3vpn.py b/tests/test_suites/bgp_userfeatures/010_bgp_functional_l3vpn.py index 646dba15bc..03c53ebbfc 100644 --- a/tests/test_suites/bgp_userfeatures/010_bgp_functional_l3vpn.py +++ b/tests/test_suites/bgp_userfeatures/010_bgp_functional_l3vpn.py @@ -10,12 +10,12 @@ # BGP peer as follows: # # Functional test suite for bgp - l3vpn-ipv4 -# +# # This suite tests advertising and receiveing routes with l3vpn content. It -# uses odl and exabgp as bgp peers. Routes advertized from odl are configured +# uses odl and exabgp as bgp peers. Routes advertized from odl are configured # via application peer. Routes advertised from exabgp is statically configured # in exabgp config file. -# For fluorine and further, instead of exabgp, play.py is used. When sending +# For fluorine and further, instead of exabgp, play.py is used. When sending # routes from odl to peer, first route containg route-target argument # have to be send from peer to odl, so odl can identify this peer. Than it # sends l3vpn route containg this argument to odl app peer, and we check @@ -71,7 +71,7 @@ class TestBgpfunctionalL3Vpn: templated_requests.delete_templated_request( f"{RT_CONSTRAIN_DIR}/bgp_peer", mapping ) - + def verify_reported_data(self, tempalate_path): """Verifies expected response""" templated_requests.get_templated_request(tempalate_path, None, verify=True) @@ -88,12 +88,12 @@ class TestBgpfunctionalL3Vpn: infra.shell("cp data/bgpfunctional/l3vpn_ipv4/bgp-l3vpn-ipv4.cfg tmp/") infra.shell(f"sed -i -e 's/EXABGPIP/{TOOLS_IP}/g' tmp/bgp-l3vpn-ipv4.cfg") infra.shell(f"sed -i -e 's/ODLIP/{ODL_IP}/g' tmp/bgp-l3vpn-ipv4.cfg") - + def test_bgp_functional_l3vpn(self, allure_step_with_separate_logging): with allure_step_with_separate_logging("step_prepare_config_files"): """???.""" self.prepare_config_files() - + with allure_step_with_separate_logging("step_configure_app_peer"): """Configures bgp application peer. Openconfig is used for carbon and above.""" bgp.set_bgp_application_peer(ip=ODL_IP) @@ -140,5 +140,5 @@ class TestBgpfunctionalL3Vpn: self.delete_bgp_peer_configuration() with allure_step_with_separate_logging("step_deconfigure_app_peer"): - """ Revert the BGP configuration to the original state: without application peer""" + """ Revert the BGP configuration to the original state: without application peer""" bgp.delete_bgp_application_peer(ip=ODL_IP) diff --git a/tests/test_suites/bgp_userfeatures/030_bgp_functional_evpn.py b/tests/test_suites/bgp_userfeatures/030_bgp_functional_evpn.py index 4c255c12ab..ee1b076739 100644 --- a/tests/test_suites/bgp_userfeatures/030_bgp_functional_evpn.py +++ b/tests/test_suites/bgp_userfeatures/030_bgp_functional_evpn.py @@ -10,7 +10,7 @@ # BGP peer as follows: # # Functional test suite for bgp - evpn -# +# # This suite tests advertising and receiveing routes with evpn content. # It uses play.py and odl as bgp peers. Routes advertized from odl are # configured via application peer. Routes advertised from play.py are stored @@ -163,7 +163,7 @@ class TestBgpfunctionalEvpn: finally: self.withdraw_route_and_verify(withdraw_hex) - + def verify_reported_data(self, tempalate_path): """Verifies expected response""" templated_requests.get_templated_request(tempalate_path, None, verify=True) @@ -171,7 +171,7 @@ class TestBgpfunctionalEvpn: def wait_until_expected_data(self, template_path, retry_count=20, interval=1): utils.wait_until_function_pass(retry_count, interval, self.verify_reported_data, template_path) - + def test_bgp_functional_evpn(self, allure_step_with_separate_logging): with allure_step_with_separate_logging("step_configure_app_peer"): """Configures bgp application peer. Openconfig is used for carbon and above.""" @@ -416,5 +416,5 @@ class TestBgpfunctionalEvpn: self.delete_bgp_peer_configuration() with allure_step_with_separate_logging("step_deconfigure_app_peer"): - """ Revert the BGP configuration to the original state: without application peer""" + """ Revert the BGP configuration to the original state: without application peer""" self.delete_app_peer() diff --git a/tests/test_suites/bgp_userfeatures/050_bmp_basic.py b/tests/test_suites/bgp_userfeatures/050_bmp_basic.py index 80a8b70484..0b6e83ce5b 100644 --- a/tests/test_suites/bgp_userfeatures/050_bmp_basic.py +++ b/tests/test_suites/bgp_userfeatures/050_bmp_basic.py @@ -7,7 +7,7 @@ # # # This is a basic test for bgp monitoring protocol feature. After the feature -# odl-bgpcep-bmp installation, the port 12345 should be bound for listening. +# odl-bgpcep-bmp installation, the port 12345 should be bound for listening. # To test this feature bgp-bmp-mock tool is used. It is a part of the bgpcep project. # It is a java tool which simulates more peers and more routers. In this particular # test suite it simulates 1 peer with 1 router, which means it advertizes one peer diff --git a/tests/test_suites/bgp_userfeatures/060_bgp_functional_mvpn.py b/tests/test_suites/bgp_userfeatures/060_bgp_functional_mvpn.py index a427a95ee3..cb4b4c4d9c 100644 --- a/tests/test_suites/bgp_userfeatures/060_bgp_functional_mvpn.py +++ b/tests/test_suites/bgp_userfeatures/060_bgp_functional_mvpn.py @@ -10,7 +10,7 @@ # BGP peer as follows: # # Functional test suite for bgp - mvpn -# +# # This suite tests advertising mvpn routes to odl. For advertising play.py # is used, and particular files are stored as *.hex files. There are # 7 different types of routes used for auto-discovery of multicast network. @@ -92,7 +92,7 @@ class TestBgpfunctionalMvpn: templated_requests.delete_templated_request( f"{MVPN_DIR}/bgp_peer", mapping ) - + def test_bgp_functional_Mvpn(self, allure_step_with_separate_logging): with allure_step_with_separate_logging("step_configure_app_peer"): """Configures bgp application peer.""" @@ -190,5 +190,5 @@ class TestBgpfunctionalMvpn: self.delete_bgp_peer_configuration() with allure_step_with_separate_logging("step_deconfigure_app_peer"): - """ Revert the BGP configuration to the original state: without application peer""" + """ Revert the BGP configuration to the original state: without application peer""" self.delete_app_peer() diff --git a/tests/test_suites/bgp_userfeatures/070_bgp_functional_l3vpn_mcast.py b/tests/test_suites/bgp_userfeatures/070_bgp_functional_l3vpn_mcast.py index 6b22b71594..e3bb8b0120 100644 --- a/tests/test_suites/bgp_userfeatures/070_bgp_functional_l3vpn_mcast.py +++ b/tests/test_suites/bgp_userfeatures/070_bgp_functional_l3vpn_mcast.py @@ -10,7 +10,7 @@ # BGP peer as follows: # # Functional test suite for bgp - l3vpn-mutlicast -# +# # This suite tests advertising l3vpn_mcast routes to odl. For advertising # play.py is used, and particular files are stored as *.hex files.There are # L3vpn-ipv4-multicast routes and L3vpn-ipv6-multicast routes tested. @@ -91,7 +91,7 @@ class TestBgpfunctionalL3vpnMcast: templated_requests.delete_templated_request( f"{L3VPN_MCAST_DIR}/bgp_peer", mapping ) - + def test_bgp_functional_l3vpn_mcast(self, allure_step_with_separate_logging): with allure_step_with_separate_logging("step_configure_app_peer"): """Configures bgp application peer.""" @@ -132,5 +132,5 @@ class TestBgpfunctionalL3vpnMcast: self.delete_bgp_peer_configuration() with allure_step_with_separate_logging("step_deconfigure_app_peer"): - """ Revert the BGP configuration to the original state: without application peer""" + """ Revert the BGP configuration to the original state: without application peer""" self.delete_app_peer() diff --git a/tests/test_suites/bgp_userfeatures/080_bgp_functional_rt_constrain.py b/tests/test_suites/bgp_userfeatures/080_bgp_functional_rt_constrain.py index 7898a12070..88f977f953 100644 --- a/tests/test_suites/bgp_userfeatures/080_bgp_functional_rt_constrain.py +++ b/tests/test_suites/bgp_userfeatures/080_bgp_functional_rt_constrain.py @@ -10,7 +10,7 @@ # BGP peer as follows: # # Functional test suite for bgp - route-target-constrain safi -# +# # This suite tests advertising rt-constrain routes to odl. For advertising # from peer, play.py is used, sending hex messages to odl. For advertising # to app-peer, we are sending post requests with routes in xml. @@ -91,7 +91,7 @@ class TestBgpfunctionalRtConstrain: templated_requests.delete_templated_request( f"{RT_CONSTRAIN_DIR}/bgp_peer", mapping ) - + def test_bgp_functional_rt_constrain(self, allure_step_with_separate_logging): with allure_step_with_separate_logging("step_configure_app_peer"): """Configures bgp application peer.""" @@ -144,5 +144,5 @@ class TestBgpfunctionalRtConstrain: self.delete_bgp_peer_configuration() with allure_step_with_separate_logging("step_deconfigure_app_peer"): - """ Revert the BGP configuration to the original state: without application peer""" + """ Revert the BGP configuration to the original state: without application peer""" self.delete_app_peer() diff --git a/tests/test_suites/bgp_userfeatures/bgp_app_peer_basic.py b/tests/test_suites/bgp_userfeatures/bgp_app_peer_basic.py index 96034b619e..5901815160 100644 --- a/tests/test_suites/bgp_userfeatures/bgp_app_peer_basic.py +++ b/tests/test_suites/bgp_userfeatures/bgp_app_peer_basic.py @@ -184,7 +184,7 @@ class TestBgpAppPeerBasic: with allure_step_with_separate_logging("step_tc3_reconnect_bgp_peer_and_check_incomming_updates_for_3_introduced_prefixes"): """Start BGP peer tool.""" self.bgp_speaker_process = bgp.start_bgp_speaker(0, my_ip=TOOLS_IP, log_level="debug") - + utils.verify_function_never_returns_value(10, 1, False, infra.is_process_still_running, self.bgp_speaker_process.pid) infra.wait_for_string_in_file(20, 1, "nlri_prefix_received:", "bgp_peer.log", threshold=3) infra.verify_string_occurence_count_in_file("nlri_prefix_received:", "bgp_peer.log", 3) diff --git a/tests/test_suites/bgp_userfeatures/bgp_functional_md5.py b/tests/test_suites/bgp_userfeatures/bgp_functional_md5.py index d136bed171..4677979935 100644 --- a/tests/test_suites/bgp_userfeatures/bgp_functional_md5.py +++ b/tests/test_suites/bgp_userfeatures/bgp_functional_md5.py @@ -48,7 +48,7 @@ class TestBgpFunctionalMd5: def reconfigure_odl_to_accept_connections(self, password: str): mapping = {"BGP_RIB_OPENCONFIG": "example-bgp-rib", "IP": TOOLS_IP, - "HOLDTIME": 180, + "HOLDTIME": 180, "PEER_PORT": 17900, "PASSWORD": password, "PASSIVE_MODE": "true"} @@ -88,6 +88,6 @@ class TestBgpFunctionalMd5: exabgp_process = bgp.start_exabgp_and_verify_connected("tmp/exa-md5.cfg", ODL_IP, expect_connected=False) bgp.stop_exabgp(exabgp_process) self.delete_bgp_peer_configuration() - - + + diff --git a/tests/test_suites/bgp_userfeatures/bgp_llgr_basic.py b/tests/test_suites/bgp_userfeatures/bgp_llgr_basic.py index ca2b7b3e61..5029040420 100644 --- a/tests/test_suites/bgp_userfeatures/bgp_llgr_basic.py +++ b/tests/test_suites/bgp_userfeatures/bgp_llgr_basic.py @@ -5,7 +5,7 @@ # terms of the Eclipse Public License v1.0 which accompanies this distribution, # and is available at http://www.eclipse.org/legal/epl-v10.html # -# This suite tests simple connection between one ibgp peer (goabgp) and Odl. +# This suite tests simple connection between one ibgp peer (goabgp) and Odl. # Peer is configured with ipv6, and gobgp connectes to odl via ipv6. import json @@ -43,11 +43,11 @@ class TestBgpLlgrBasic: def reconfigure_odl_to_accept_connections(self): mapping = {"BGP_RIB_OPENCONFIG": "example-bgp-rib", "IP": TOOLS_IP, - "HOLDTIME": 180, + "HOLDTIME": 180, "PEER_PORT": 17900, "PASSIVE_MODE": "true"} templated_requests.put_templated_request("data/ipv6/bgp_peer", mapping, json=False) - + def delete_bgp_peer_configuration(self): mapping = {"BGP_RIB_OPENCONFIG": "example-bgp-rib", "IP":TOOLS_IP } templated_requests.delete_templated_request("data/ipv6/bgp_peer", mapping) @@ -73,7 +73,7 @@ class TestBgpLlgrBasic: with allure_step_with_separate_logging("step_reconfigure_odl_to_accept_connections"): """Configure BGP peer modules with initiate-connection set to false with short ipv6 address.""" self.reconfigure_odl_to_accept_connections() - + with allure_step_with_separate_logging("step_start_gobgp"): """Starts gobgp peer simulator.""" self.gobgp_process = bgp.start_gobgp_and_verify_connected(f"tmp/gobgpd", f"tmp/{GOBGP_CFG}", TOOLS_IP) diff --git a/tests/test_suites/bgp_userfeatures/ibgp_peer_lsp.py b/tests/test_suites/bgp_userfeatures/ibgp_peer_lsp.py index 35eabb7539..4e8e0e2bd6 100644 --- a/tests/test_suites/bgp_userfeatures/ibgp_peer_lsp.py +++ b/tests/test_suites/bgp_userfeatures/ibgp_peer_lsp.py @@ -9,7 +9,7 @@ # peer operations and checks for IP4 topology updates and updates towards # BGP peer as follows: # -# +# # Basic tests for iBGP peers. # Test suite performs basic iBGP functional test case for carrying LSP State # Information in BGP as described in diff --git a/tests/test_suites/bgp_userfeatures/ibgp_peers_basic.py b/tests/test_suites/bgp_userfeatures/ibgp_peers_basic.py index 1b925300a3..7bdb5aba8b 100644 --- a/tests/test_suites/bgp_userfeatures/ibgp_peers_basic.py +++ b/tests/test_suites/bgp_userfeatures/ibgp_peers_basic.py @@ -106,7 +106,7 @@ class TestIbgpPeersBasic: infra.execute_karaf_command(f"log:set {ODL_LOG_LEVEL}") infra.execute_karaf_command(f"log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.bgpcep") infra.execute_karaf_command(f"log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol") - + with allure_step_with_separate_logging("step_tc1_configure_two_ibgp_route_reflector_client_peers"): """Configure two iBGP peers as routing reflector clients.""" self.configure_ibgp_peer(BGP_PEER1_IP, rr_client=True, cluster_id=False) @@ -268,7 +268,7 @@ class TestIbgpPeersBasic: in second peer which has local route-reflector-cluster-id.""" mapping = {"IP": BGP_PEER2_IP, "BGP_RIB_OPENCONFIG": "example-bgp-rib", "PEER_NUMBER": 1, "CLUSTER_ID": BGP_PEER1_IP, "DEFAULT_ID": "127.0.0.4"} utils.wait_until_function_pass(10, 1, templated_requests.get_templated_request, f"{BGP_DATA_FOLDER}/cluster_id/peer_rib_out", mapping, verify=True) - + with allure_step_with_separate_logging("step_tc4_disconnect_bgp_peers"): """Stop BGP peer & store logs.""" bgp.stop_bgp_speaker(self.bgp_peer1_process)